import request from '@/utils/request'

export function fetchChapterList(query) {
  return request({
    url: 'manager/chapter/listBySeries',
    method: 'get',
    params: query
  })
}

export function fetchSimpleChapterList() {
  return request({
    url: 'manager/chapter/list',
    method: 'get'
  })
}

export function uploadChapter(data) {
  return request({
    url: 'manager/chapter/upload',
    method: 'post',
    data
  })
}

export function createChapter(data) {
  return request({
    url: 'manager/chapter/create',
    method: 'post',
    data
  })
}

export function setChapterOrder(data) {
  return request({
    url: 'manager/chapter/order',
    method: 'post',
    data
  })
}

export function updateChapter(data) {
  return request({
    url: 'manager/chapter/update',
    method: 'post',
    data
  })
}

export function deleteChapter(data) {
  return request({
    url: 'manager/chapter/delete',
    method: 'post',
    data
  })
}
